package com.redoor.app.stake.auth.dao;

import com.redoor.app.stake.auth.model.BaseUser;

import com.redoor.app.stake.auth.model.BaseUserCriteria;

import com.redoor.app.stake.auth.model.BaseUserView;
import com.redoor.app.stake.auth.model.serviceModel.BaseUserServiceBean;

import com.redoor.app.stake.auth.model.serviceModel.LoginUserBean;
import com.redoornetwork.framework.mybatis.mapper.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface BaseUserMapper extends Mapper<BaseUser> {
    /**
     * 查询用户的所有权限
     * @param uuid  用户ID
     */
    List<String> queryAllPerms(String uuid);

    /**
     * 查询用户的所有菜单ID
     */
    List<Long> queryAllMenuId(String uuid);


    List<BaseUserView> getByParams(BaseUserCriteria criteria);

    /**
     * @Author zhangYiHang
     * @Date 2018/3/7 11:36
     * @param baseUserActon
     * 根据用户Uuid以及密码进行修改
     */
    int updateByUserUuidAndPassword(BaseUserServiceBean baseUserActon);

    /**
     * 根据条件查询用户
     * @Author zhangYiHang
     * @Date 2018/3/7 20:26
     */
    List<BaseUser> qryUser(BaseUser baseUser);

    /**
     * 根据登陆名称查询登陆用户信息
     * @param loginname
     * @return
     */
    LoginUserBean qryLoginUser(String loginname);
}